<?php
class Application_Model_Schema_GameObject {
	protected $_id;
	protected $_object;
	protected $_parent;
	protected $_enabled;

	public function __set($name, $value) {
		$method = 'set' . $name;
		if(!method_exists($this, $method)) {
			throw new Exception('Set Invalid Game Object Property: ' . $name);
		}
		$this->$method($value);
	}

	public function __get($name) {
		$method = 'get' . $name;
		if(!method_exists($this, $method)) {
			throw new Exception('Get Invalid Game Object Property: ' . $name);
		}
		return $this->$method();
	}

	public function setId($id) {
		$this->_id = (int) $id;
		return $this;
	}

	public function getId() {
		return $this->_id;
	}

	public function setObject($object) {
		$this->_object = $object;
		return $this;
	}

	public function getObject() {
		return $this->_object;
	}

	public function setParent($parent) {
		$this->_parent = $parent;
		return $this;
	}

	public function getParent() {
		return $this->_parent;
	}

	public function setEnabled($enabled) {
		$this->_enabled = (bool) $enabled;
		return $this;
	}

	public function getEnabled() {
		return $this->_enabled;
	}
}
?>